<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
	<head>
		<title>获取激活码</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">

	</head>
	<LINK href="<%=request.getContextPath()%>/css/cssCn.css"
		type="text/css" rel="stylesheet">
	<%@ include file="/comm.jsp"%>
<script>
	function submitApply(){
		var emailVal=$d("txtEmail").value;
		if(emailVal == ""){
			$d("userIdError").innerHTML="请输入邮箱";
			return;		
		}
		//校验邮箱
		var params = {
					email:emailVal
					};
		$.ajax({type: "POST",
		       url: "ajaxPwd_regActive",
		       data: params,
		       async: false,
		       success: function(responseMsg){
		         var result=eval('('+responseMsg+')');
				 if(result.retcode=="0000"){
				  	emailError.innerHTML="";
				  	put_div.style.display="none";
				  	suc_div.style.display="block";
				 }else{
				  	emailError.innerHTML=result.retmsg;
				 }
			  }
			},"json");
	}
</script>

	<body leftmargin="0" topmargin="0" marginheight="0">
		<s:form name="formpage" action="" namespace="/seal">
			<s:token>
			</s:token>
			<%@ include file="/messages.jsp"%>
			<div id="put_div">
				<table align="center" width="400">
					<tr>
						<td colspan="2">
							请输入您的邮箱
						</td>
					</tr>
					<tr>
						<td colspan="2"><span id="emailError"></span></td>
					</tr>
					<tr>
						<td nowrap="nowrap" align="right">
							邮箱：
						</td>
						<td>
							<input id="txtEmail" name="txtEmail" type="text" maxlength="40" title="*必填" />
						</td>
					</tr>
					<tr>
						<td colspan="2" align="center">
							<input type="button" class="button" id="ok" name="ok"
								value=" 下一步 " onclick="submitApply();" />
						</td>
					</tr>
				</table>
			</div> <!-- end #pub_div -->

			<div id="suc_div" style="display: none;" align="center">
				<div>
					您的申请已提交成功，请查看您的邮箱。
				</div>
				<div>
					<a class="btn_logintwo" href="javascript:void(0);"
						onclick="javascript:window.opener=null;window.close();return false;"><span>关闭此页</span>
					</a>
				</div>
			</div>

		</s:form>
		<%@ include file="/button.jsp"%>
	</body>
</html>
